package com.study.leetcode;

public class Solution_674 {
    public static int findLengthOfLCIS(int[] nums) {
        int length = nums.length;
        if (length == 0) {
            return length;
        }
        int count = 1;
        int left = 0;
        int right;
        for (int i = 1; i < length; i++) {
            right = i;
            if (nums[right - 1] < nums[right]) {
                count = Math.max(count, right - left + 1);
            } else {
                left = right;
            }
        }
        return count;
    }

    public static void main(String[] args) {
        int[] nums = {1, 1, 2, 1,5,4,6,7,8,9,1,2,3};
        System.out.println("findLengthOfLCIS(nums) = " + findLengthOfLCIS(nums));

    }
}
